lcImgRefResize Home

This function performs resampling (or scaling, zooming) of a greyscale or RGB image to the desired destination width and height.
Resampling refers to changing the pixel dimensions (and therefore display size) of an image. When you downsample (or decrease the number of pixels), information is deleted from the image. When you upsample (or increase the number of pixels), new pixels are added based on color values of existing pixels. You specify an interpolation filter to determine how pixels are added or deleted.

 BOOL lcImgRefResize (
   HANDLE hImgRef,
   int NewWidth,
   int NewHeight,
   int Method
 );

Parameters
hImgRef
  Handle to a image reference object.
NewWidth
  Destination image width (pixels)
NewHeight
  Destination image height (pixels)
Method
  Resampling method. Can be one of the following values:

Filter flag Description
LC_IMGRES_BOX Box, pulse, Fourier window, 1st order (constant) B-Spline
LC_IMGRES_BILINEAR Bilinear filter
LC_IMGRES_BSPLINE 4th order (cubic) B-Spline
LC_IMGRES_BICUBIC Mitchell and Netravali's two-param cubic filter
LC_IMGRES_CATMULLROM Catmull-Rom spline, Overhauser spline
LC_IMGRES_LANCZOS3 Lanczos-windowed sinc filter


Return Value

  If the function succeeds, the return value is nonzero (TRUE).